<!DOCTYPE html>
<html lang="zh"  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>新增企业客户</title>
    <link rel="icon" href="favicon.ico" type="images/ico">
    <meta name="author" content="dc">
    <link href="/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="/css/materialdesignicons.min.css" rel="stylesheet"/>
    <link href="/css/animate.min.css" rel="stylesheet"/>
    <link href="/css/style.min.css" rel="stylesheet"/>
    <link href="/js/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/js/jquery-confirm/jquery-confirm.min.css"/>
    <!--时间选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css">
    <!--日期选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datepicker/bootstrap-datepicker3.min.css">
    <link rel="stylesheet" href="/css/input_tags.css"/>
    <!-- 多选下拉 -->
    <link rel="stylesheet" href="/css/bootstrap-multiselect.css" type="text/css"/>
    <link rel="stylesheet" href="/css/bootstrap-select.css" type="text/css"/>
    <link rel="stylesheet" href="/js/need/verfont.css" />
    <link rel="stylesheet" href="/js/need/select.2.0.css" />
    <link rel="stylesheet" href="/css/skin.css"/>
    <link rel="stylesheet" href="/css/customerManager/addCustomer.css"/>

</head>
<body style="height: 100%">
<div class="container-fluid p-t-15">
    <div class="row">
        <div class="col-sm-12">
            <div class="card" style="background: #fff;">
                <div class="card-header">
                    <h1>新增企业客户</h1>
                </div>



                <div class="card-body">
                    <div class="title">客户信息</div>
                    <form class="form-horizontal" id="customerForm0" style="margin-left: 130px;" autocomplete="off">
                        <div class="form-group">
                            <span id="customerBs" class="hidden" th:text="${addOpportunityQO.customerBs}"></span>
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">客户池名称</label>
                            <div class="col-sm-4">
                                <select class="form-control" id="customerPoolIdSelect" type="text" data-live-search="true">
                                </select>
                            </div>

                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">客户名称</label>
                            <div class="col-sm-4">
                                <input id="customerName" type="text" class="form-control" placeholder="请输入客户名称">
                            </div>
                            <button type="button" class="btn btn-primary" onclick="checkDuplicate()" data-toggle="modal" >查重</button>
                            <button type="button" class="btn btn-primary">导入资料</button>
                            <button type="button" class="btn btn-primary" onclick="importBtn()">企查查导入</button>
                            <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#urlCheckDuplicate">企查查网址导入</button>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">邮箱</label>
                            <div class="col-sm-4">
                                <input id="email" type="text" class="form-control" placeholder="请输入邮箱">
                            </div>
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">客户编号</label>
                            <div class="col-sm-4">
                                <input id="customerNumber" type="text" class="form-control" placeholder="请输入客户编号">
                            </div>
                        </div>
                        <div class="form-group">
                            <!--<label class="col-sm-1 control-label" style="width: 120px;text-align: left;">客户类型</label>
                            <div class="col-sm-4">
                                <input id="customerType" type="text" class="form-control" placeholder="请输入客户类型">
                            </div>-->
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">客户来源</label>
                            <div class="col-sm-4">
                                <select class="form-control" id="customerSource" type="text" data-live-search="true">
                                    <option value="">请选择客户来源</option>
                                    <option value="1">促销</option>
                                    <option value="2">搜索引擎</option>
                                    <option value="3">广告</option>
                                    <option value="4">转介绍</option>
                                    <option value="5">线上注册</option>
                                    <option value="6">线上询价</option>
                                    <option value="7">预约上门</option>
                                    <option value="8">陌拜</option>
                                    <option value="9">电话咨询</option>
                                    <option value="10">邮件咨询</option>
                                    <option value="11">线索转化</option>
                                </select>
                            </div>
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">客户级别</label>
                            <div class="col-sm-4">
                                <select class="form-control" id="customerLevel" type="text" data-live-search="true">
                                    <option value="">请选择客户级别</option>
                                    <option value="1">A</option>
                                    <option value="2">B</option>
                                    <option value="3">C</option>
                                    <option value="4">D</option>
                                    <option value="5">E</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">原客户ID</label>
                            <div class="col-sm-4">
                                <input id="originalCustomerId" type="text" class="form-control" placeholder="请输入原客户ID">
                            </div>
                            <!--<label class="col-sm-1 control-label" style="width: 120px;text-align: left;">客户状态</label>
                            <div class="col-sm-4">
                                <select class="form-control" id="customerState" type="text" title="请选择客户状态" data-live-search="true">
                                    <option value="">请选择客户状态</option>
                                    <option value="1">意向客户</option>
                                    <option value="2">新单客户</option>
                                    <option value="3">续费客户</option>
                                    <option value="4">流失客户</option>
                                </select>
                            </div>-->
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">成交状态</label>
                            <div class="col-sm-4">
                                <input id="dealStatus" type="text" class="form-control" placeholder="请输入成交状态">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">客户行业-一级</label>
                            <div class="col-sm-4">
                                <input id="customerIndustryFirst" type="text" class="form-control" placeholder="请输入客户行业-一级">
                            </div>
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">客户行业-二级</label>
                            <div class="col-sm-4">
                                <input id="customerIndustrySecond" type="text" class="form-control" placeholder="请输入客户行业-二级">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">所在地区</label>
                            <div class="col-sm-10" style="display: flex;">
                                <select onchange="changeProvince()" id="province" name="province" style="width: 200px;" class="form-control" type="text" data-live-search="true"></select>
                                <select onchange="changeCity()" id="city" name="city" style="width: 200px;" class="form-control" type="text" data-live-search="true"></select>
                                <select id="county" name="county" style="width: 200px;" class="form-control" type="text" data-live-search="true"></select>
                            </div>
                        </div>
                    </form>
                    <div class="title">工商信息</div>
                    <form class="form-horizontal" id="customerForm" style="margin-left: 130px;" autocomplete="off">
                        <div class="form-group">
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">法定代表人</label>
                            <div class="col-sm-4">
                                <input id="legalRepresentative" type="text" class="form-control" placeholder="请输入法定代表人">
                            </div>
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">注册资本</label>
                            <div class="col-sm-4">
                                <input id="registeredCapital" type="text" class="form-control" placeholder="请输入注册资本"
                                       oninput="value=value.replace(/[^\d]/g,'')">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">统一社会信用代码</label>
                            <div class="col-sm-4">
                                <input id="unifiedSocialCreditCode" type="text" class="form-control" placeholder="请输入统一社会信用代码">
                            </div>
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">注册时间</label>
                            <div class="col-sm-4">
                                <input id="registrationTime" type="text"  class="form-control" placeholder="请输入注册时间">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">详细地址</label>
                            <div class="col-sm-4">
                                <input id="detailedAddress" type="text" class="form-control" placeholder="请输入详细地址">
                            </div>
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">企业对外手机</label>
                            <div class="col-sm-4">
                                <input id="enterpriseExternalPhone" type="text" class="form-control" placeholder="请输入企业对外手机">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">企业对外座机</label>
                            <div class="col-sm-4">
                                <input id="enterpriseExternalLandline" type="text" class="form-control" placeholder="请输入企业对外座机">
                            </div>
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">公司网址</label>
                            <div class="col-sm-4">
                                <input id="companyWebsite" type="text" class="form-control" placeholder="请输入公司网址">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">公司规模</label>
                            <div class="col-sm-4">
                                <select class="form-control" id="companySize" type="text" data-live-search="true">
                                    <option value="">请选择公司规模</option>
                                    <option value="1">0-20人</option>
                                    <option value="2">20-99人</option>
                                    <option value="3">100-499人</option>
                                    <option value="4">500-999人</option>
                                    <option value="5">1000-9999人</option>
                                </select>
                            </div>
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">注册号</label>
                            <div class="col-sm-4">
                                <input id="registrationNumber" type="text" class="form-control" placeholder="请输入注册号">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">组织机构代码</label>
                            <div class="col-sm-4">
                                <input id="organizationCode" type="text" class="form-control" placeholder="请输入组织机构代码">
                            </div>
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">公司类型</label>
                            <div class="col-sm-4">
                                <select class="form-control" id="companyType" type="text" data-live-search="true">
                                    <option value="">请选择公司类型</option>
                                    <option value="1">有限责任公司</option>
                                    <option value="2">股份有限公司</option>
                                    <option value="3">集体所有制</option>
                                    <option value="4">国有企业</option>
                                    <option value="5">个体工商户</option>
                                    <option value="6">个人独资企业</option>
                                    <option value="7">有限合伙</option>
                                    <option value="8">普通合伙</option>
                                    <option value="9">外商独资企业</option>
                                    <option value="10">港澳台</option>
                                    <option value="11">联营企业</option>
                                    <option value="12">私营企业</option>
                                    <option value="13">企业</option>
                                    <option value="14">事业单位</option>
                                    <option value="15">基金会</option>
                                    <option value="16">社会组织</option>
                                    <option value="17">律所</option>
                                    <option value="18">香港特别行政区企业</option>
                                    <option value="19">台湾省企业</option>
                                    <option value="20">独资企业</option>
                                    <option value="21">国企</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">企业状态</label>
                            <div class="col-sm-4">
                                <select class="form-control" id="enterpriseState" type="text" data-live-search="true">
                                    <option value="">请选择企业状态</option>
                                    <option value="1">在业</option>
                                    <option value="2">续存</option>
                                    <option value="3">吊销</option>
                                    <option value="4">注销</option>
                                    <option value="5">迁出</option>
                                    <option value="6">筹建</option>
                                    <option value="7">清算</option>
                                    <option value="8">迁入</option>
                                    <option value="9">停业</option>
                                    <option value="10">撤销</option>
                                    <option value="11">在业/存续</option>
                                </select>
                            </div>
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">资本类型</label>
                            <div class="col-sm-4">
                                <select class="form-control" id="capitalType" type="text" data-live-search="true">
                                    <option value="">请选择资本类型</option>
                                    <option value="1">人民币</option>
                                    <option value="2">美元</option>
                                    <option value="3">其他</option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">参保人数</label>
                            <div class="col-sm-4">
                                <input id="insuredNumber" type="text" class="form-control" placeholder="请输入参保人数"
                                       oninput="value=value.replace(/[^\d]/g,'')">
                            </div>
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">传真</label>
                            <div class="col-sm-4">
                                <input id="fax" type="text" class="form-control" placeholder="请输入传真">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">财务人数</label>
                            <div class="col-sm-4">
                                <input id="financialNumber" type="text" class="form-control" placeholder="请输入财务人数"
                                       oninput="value=value.replace(/[^\d]/g,'')">
                            </div>
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">行业</label>
                            <div class="col-sm-4">
                                <select class="form-control" id="industry" type="text" data-live-search="true">
                                    <option value="">请选择行业</option>
                                    <option value="农、林、牧、渔业">农、林、牧、渔业</option>
                                    <option value="采矿业">采矿业</option>
                                    <option value="制造业">制造业</option>
                                    <option value="电力、热力、燃气及水生产和供应业">电力、热力、燃气及水生产和供应业</option>
                                    <option value="建筑业">建筑业</option>
                                    <option value="有色金属冶炼和压延加工业">有色金属冶炼和压延加工业</option>
                                    <option value="批发和零售业">批发和零售业</option>
                                    <option value="交通运输、仓储和邮政业">交通运输、仓储和邮政业</option>
                                    <option value="住宿和餐饮业">住宿和餐饮业</option>
                                    <option value="信息传输、软件和信息技术服务业">信息传输、软件和信息技术服务业</option>
                                    <option value="金融业">金融业</option>
                                    <option value="房地产业">房地产业</option>
                                    <option value="租赁和商务服务业">租赁和商务服务业</option>
                                    <option value="科学研究和技术服务业">科学研究和技术服务业</option>
                                    <option value="水利、环境和公共设施管理业">水利、环境和公共设施管理业</option>
                                    <option value="居民服务、修理和其他服务业">居民服务、修理和其他服务业</option>
                                    <option value="教育">教育</option>
                                    <option value="卫生和社会工作">卫生和社会工作</option>
                                    <option value="文化、体育和娱乐业">文化、体育和娱乐业</option>
                                    <option value="公共管理、社会保障和社会组织">公共管理、社会保障和社会组织</option>
                                    <option value="国际组织">国际组织</option>
                                    <option value="个人客户">个人客户</option>
                                    <option value="其他">其他</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">标签</label>
                            <div class="col-sm-10">
                                <div style="width:100%;">
                                    <input type="text" name="staticPath" value="" id="staticPath2"/>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">经营范围</label>
                            <div class="col-sm-9">
                                <textarea id="businessScope" class="form-control" placeholder="请输入经营范围"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">备注</label>
                            <div class="col-sm-9">
                                <textarea id="remark" class="form-control" placeholder="请输入备注"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="img-box">
                                <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">上传图片</label>
                                <div class="col-sm-9">
                                    <img style="width:200px;height: 200px;border:1px" id="customerPic"/>
                                    <div id="imageId" style="display: none"></div>
                                    <input type="file" id="files"  onchange="getCustomerPicUpload(this)" class="img-button"
                                           style="display: flex;justify-content: center;align-items: center;width: 74px;
                               height: 30px;margin-left: 17%;transform: translateX(-50%);margin-top: 10px;"/>
                                </div>

                            </div>
                        </div>
                    </form>
                    <div style="width: 100%;text-align: center;">
                        <button class="btn btn-primary" type="submit" style="margin-right: 30px;"
                                onclick="addCustomer()">提交
                        </button>
                        <button class="btn btn-default" type="button" onclick="cancelAddCustomer()">取消</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="staticBackdrop" data-backdrop="static" data-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">查重</h5>
            </div>
            <div class="modal-body">
                <div class="form-row clearfix" style="padding: 10px;">
                    <ul id="checkDuplicateList">

                    </ul>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal">确定</button>
            </div>
        </div>
    </div>
</div>
<div class="modal fade modal-top" id="urlCheckDuplicate" data-backdrop="static" data-keyboard="false" tabindex="-1" aria-labelledby="urlCheckDuplicateLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">企查查网址输入</h5>
            </div>
            <div class="modal-body">
                <div class="form-row clearfix" style="padding: 10px;">
                    <span>请输入网址：</span>
                    <input type="text"  class="form-control" style="width: 60%" id="CheckDuplicateInput">
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="sure()">确定</button>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script src="/js/jquery-confirm/jquery-confirm.min.js"></script>
<script src="/js/crm/common/city.js"></script>
<script src="/js/crm/common/common.js"></script>
<script src="/js/crm/common/input-tag.js"></script>
<!--时间选择插件-->
<script src="/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>
<!--日期选择插件-->
<script src="/js/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
<script src="/js/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<!-- 多选框下拉 -->
<script type="text/javascript" src="/js/bootstrap-select.js"></script>
<script src="/js/verSelect.2.0.js"></script>
<script src="/js/crm/customerManager/user/userAddCustomer.js"></script>
<script>

</script>
</html>